import instance from "@/utils/http.js"

export function getCategoryAPI () {
  return instance({
    url: '/home/category/head'
  })
}


/**
 * @description: 获取banner图
 * @param {*}
 * @return {*}
 */
// import  httpInstance  from '@/utils/http'
export function getBannerListAPI (params = {}){
  const { distributionSite = '1'} = params
  return instance.get(
    'home/banner',
    {
      distributionSite
    }
  )
}

export const getCategoryFilterAPI = (id) => {
  return instance({
    url:'/category/sub/filter',
    params:{
      id
    }
  })
}



export const getSubCategoryAPI = (data) => {
  return instance({
    url:'/category/goods/temporary',
    method:'POST',
    data
  })
}
